const token_key = "TOKEN";
const user_key = "USER"
// 设置存储token
// function saveToken(t){
//     localStorage.setItem(token_key,t)
// }
let saveToken = t=>localStorage.setItem(token_key,t)
// 获取token
// function getToken(){
//     return localStorage.getItem(token_key);
// }
let getToken = ()=>localStorage.getItem(token_key);
// 删除token
// function removeToken(){
//     localStorage.removeItem(token_key)
// }
let removeToken = ()=>localStorage.removeItem(token_key)
// 设置用户信息
let saveUser = user=>sessionStorage.setItem(user_key,JSON.stringify(user));
// 获取用户信息
let getUser = ()=>JSON.parse(sessionStorage.getItem(user_key));
// 删除用户信息
let removeUser = ()=>sessionStorage.removeItem(user_key);
export {
    saveToken,
    getToken,
    removeToken,
    saveUser,
    getUser,
    removeUser
}